<template>
  <div class="customerseas">
    <Tabs :text="text">
      <Search @data ="upState" @easySearch="easySearch"/>
    </Tabs>
    <SearchItem v-if="state"></SearchItem>
    <router-view></router-view>
  </div>
</template>

<script>
import Tabs from "../components/Tabs.vue";
import Search from "../components/Search.vue";
import SearchItem from"../components/SearchItem.vue";
import { mapMutations } from 'vuex';

export default {
  components: {
    Tabs,
    Search,
    SearchItem
  },
  data() {
    return {
      text: [
        {
          id: "1",
          textName: "公海客户列表",
          url: "/customerseas/poollist",
        },
        {
          id: "2",
          textName: "重复数据",
          url: "/customerseas/repeatingdata",
        },
        {
          id: "3",
          textName: "待审核申请",
          url: "/customerseas/checking",
        },
        {
          id: "4",
          textName: "导入资源",
          url: "/customerseas/importing",
        },
        {
          id: "5",
          textName: "数据导出",
          url: "/customerseas/exporting",
        },
        {
          id: "6",
          textName: "新增公海客户",
          url: "/customerseas/addpool",
        },
        // {
        //   id: "7",
        //   textName: "自定义设置",
        //   url: "/customerseas/setting",
        // },
      ],
      state:false,
    };
  },
  methods: {
    ...mapMutations(['customerSeasStore/EasySearch']),
    
    easySearch(val) {
      this['customerSeasStore/EasySearch'](val);
    },
    upState(data){
      this.state = !data//状态处理
    },
  },
};
</script>

<style lang="scss" scoped>
</style>